import React from "react"
import { NavBar } from 'antd-mobile';
import styles from './index.module.scss'
import { withRouter } from 'react-router-dom'
import classNames from 'classnames'
function myNavBar({ title, history, className, rightContent }) {
    return (
        <NavBar
            mode="light"
            className={classNames(styles.navBar, className)}
            icon={<i className="iconfont icon-back"></i>}
            onLeftClick={() =>
                history.goBack()
            }
            rightContent={rightContent}
        >{title}</NavBar>
    )
}
export default withRouter(myNavBar)